#include "Sprinkler.h"


void Sprinkler::InitParticle(Particle& out)
{
	// Generate about the origin.
	out.initialPosition = D3DXVECTOR3(0.0f, 0.0f, 0.0f);

	out.initialTime     = m_time;
	out.lifeTime        = GetRandomFloat(4.0f, 5.0f);
	out.initialColor    = D3DCOLOR_ARGB(255 ,255, 255, 255);
	out.initialSize     = GetRandomFloat(8.0f, 12.0f);
	out.mass            = GetRandomFloat(0.8f, 1.2f);

	out.initialVelocity.x = GetRandomFloat(-2.5f, 2.5f);
	out.initialVelocity.y = GetRandomFloat(15.0f, 25.0f);
	out.initialVelocity.z = GetRandomFloat(-2.5f, 2.5f);
}